<template>
  <card-wrapper :data-item="dataItem" class="w-288">
    <area-top :text-left="dataItem['质检单']" :text-center="$i18n.t('mind.qualityInspectionForm')" />
    <div class="flex m-4">
      <div class="font-12 color-333333">
        <span>{{ $i18n.t("mind.disappear") }}</span>
        <span class="ml-8">{{ dataItem["来料"] }}</span>
      </div>
      <div class="ml-16 font-12 color-333333">
        <span>{{ $i18n.t("mind.abnormal") }}</span>
        <span class="ml-8 color-FF4656">{{ dataItem["异常"] }}</span>
      </div>
      <div class="ml-16 font-12 color-333333">
        <span>{{ $i18n.t("mind.takeOver") }}</span>
        <span class="ml-8">{{ dataItem["接收"] }}</span>
      </div>
    </div>
    <label-normal label="检测结果" class="mt-8">
      <span :class="colorParams[dataItem['检测结果-颜色']]">{{
        dataItem["检测结果"] || "无"
      }}</span>
    </label-normal>
    <label-normal :label="$i18n.t('mind.reviewResult')" class="mt-8">
      <span :class="colorParams[dataItem['评审结果-颜色']]">{{
        dataItem["评审结果"] || "无"
      }}</span>
    </label-normal>
    <label-normal
      :label="$i18n.t('mind.inspector')"
      :value="`${dataItem['检测人'] || '无'} ${dataItem['检测时间'] || '无'}`"
      class="mt-8"
    ></label-normal>
  </card-wrapper>
</template>

<script>
import CardWrapper from "@/views/mind/components/common/card-wrapper.vue";
import AreaTop from "@/views/mind/components/common/area-top.vue";
import LabelNormal from "@/views/mind/components/common/label-normal.vue";
export default {
  name: "card-material-testing", // 来料检测
  props: {
    dataItem: {
      type: Object,
      default: () => {},
    },
  },
  components: {
    CardWrapper,
    AreaTop,
    LabelNormal,
  },
  computed: {
    colorParams() {
      return {
        黄色: "text-E7A11A",
        绿色: "text-19AA8D",
        红色: "text-FF4656",
      };
    },
  },
};
</script>

<style lang="scss" scoped></style>
